{% extends "base.html" %}
{% block title %}Home{% endblock %}
{% block head %}
<style type="text/css"></style>
{% endblock %}
{% block content %}

<div class="jumbotron  p-5 text-white rounded bg-dark mb-3">
    <div class="d-flex justify-content-end">
        <img src="{{url_for('static',filename='pic/logo.png')}}" class="img-fluid p-0 m-0 d-inline"
            alt="Responsive image" />
    </div>
    <div class=" row ">

        <div class="col-md-12 px-0  ">
            <h1 class="display-4  py-2 my-2 font-italic">
                Hello, OPCer! Welcome to
                <span class="badge badge-info">Configuration Studio.</span>
            </h1>
            <blockquote class="blockquote text-right ">


                {% with messages = get_flashed_messages(category_filter=["success"]) %}
                {% if messages %}

                {% for message in messages %}
                <p class="mb-0">{{ message }}</p>

                {% endfor %}

                {% endif %}
                {% endwith %}


                <footer class="blockquote-footer">Power by <cite title="Source Title">冒险湾一狗</cite></footer>
            </blockquote>
        </div>
    </div>
</div>

<div class="shadow-lg p-3 mb-3 bg-light rounded">
    <h5 class="display-6"> ——>点击按钮开始<span class="badge badge-info">配置之旅</span><—— 
    </h5> 
</div>

<div>
    <a class="btn btn-outline-info btn-lg" href="{{ url_for('cs.module_reg') }}" role="button">のModule 注册</a>
    <a class="btn btn-outline-success btn-lg" href="{{ url_for('cs.load_opc_da') }}" role="button">のOPC 配 置</a>
    <a class="btn btn-outline-primary btn-lg" href="{{ url_for('cs.load_modbus') }}" role="button">のModbus 配 置</a>
    <a class="btn btn-outline-secondary btn-lg" href="{{ url_for('admin.add') }}" role="button">のUser 注 册</a>
    <a class="btn btn-outline-danger btn-lg" href="{{ url_for('faq.show_issue') }}" role="button">の我要吐槽</a>
    <a class="btn btn-outline-warning btn-lg" href="{{ url_for('faq.contact') }}" role="button">の联系我们</a>
</div>

<!-- <ul class="nav flex-column" id='es6'>
      </ul> -->

<script type="module">

    import {route} from  "{{url_for('static',filename='js/route.js')}}"
  var $comm=''
    route.map( (item,index) => {
    $comm+=
    '<li class="nav-item">' +
      '<a class="nav-link border-bottom" href="'+item.url+'"'+'"style="font-size: x-large;font-style: italic;font-family: cursive;">'+
        '<span data-feather="grid" style="width: 24px; height: 24px;color:black;"></span>'+
        item.name+
        '</a></li>'
  })
    var $subject_con = $('#es6');
    $subject_con.html($comm)

</script>

{% endblock %}